package sch.frog.behavioral.memento;

public class Originator {

    private double money;

    private int status;

    public Memento createMemento(){
        return new Memento(this.money, this.status);
    }

    public void run(){
        money++;
        status++;
    }

    public void restoreMemento(Memento memento){
        this.setMoney(memento.getMoney());
        this.setStatus(memento.getStatus());
    }

    double getMoney() {
        return money;
    }

    void setMoney(double money) {
        this.money = money;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
